package com.jiang.myfm.fragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.jiang.myfm.R;
import com.squareup.picasso.Picasso;

/**
 * A simple {@link Fragment} subclass.
 */
public class MainHeadImageFragment extends Fragment {

    private ImageView mImageView;
    public MainHeadImageFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View ret = inflater.inflate(R.layout.fragment_main_head_image, container, false);
        mImageView= (ImageView) ret.findViewById(R.id.main_head_image);
        Bundle bundle=getArguments();
        String picUrl = bundle.getString("picUrl");
        Picasso.with(getContext())
                .load(picUrl)
                .into(mImageView);
        return ret;
    }
}
